import request from '@/utils/request'

///web/employee/accountInfoList get 获取账号信息下拉列表 
export function getAccountInfoList() {
  return request({
    url: '/basic/web/employee/accountInfoList',
    method: 'get',
  })
}

// /web/employee/employeeStatusList get 人员状态
export function getEmployeeStatusList() {
  return request({
    url: '/basic/web/employee/employeeStatusList',
    method: 'get',
  })
}

// /web/employee/workNatureList get 用工性质下拉列表
export function getWorkNatureList() {
  return request({
    url: '/basic/web/employee/workNatureList',
    method: 'get',
  })
}

// /web/employee/sexList get 获取性别下拉列表
export function getSexList() {
  return request({
    url: '/basic/web/employee/sexList',
    method: 'get',
  })
}

// /web/employee/deptTree  get 查询部门树结构信息 params
export function deptTreeSelect(params) {
  return request({
    url: '/basic/web/employee/deptTree',
    method: 'get',
    params
  })
}

// /web/employee/postList get 获取岗位下拉列表
export function getPostList() {
  return request({
    url: '/basic/web/employee/postList',
    method: 'get',
  })
}

// /web/employee/list get 查询员工管理列表 params
export function listEmployee(params) {
  return request({
    url: '/basic/web/employee/list',
    method: 'get',
    params
  })
}

///web/employee/{id} get 获取员工管理详细信息
export function getEmployee(id) {
  return request({
    url: `/basic/web/employee/${id}`,
    method: 'get',
  })
}

// /web/employee post 新增员工管理
export function addEmployee(data) {
  return request({
    url: '/basic/web/employee',
    method: 'post',
    data
  })
}

// /web/employee put 修改员工管理
export function updateEmployee(data) {
  return request({
    url: '/basic/web/employee',
    method: 'put',
    data
  })
}


// /web/employee/unbind/{id} get 解绑账号
export function unbind(id) {
  return request({
    url: `/basic/web/employee/unbind/${id}`,
    method: 'get',
  })
}